// run: $exec < input
#include <iostream>
#include <vector>
#include <string>

int const inf = 1 << 30;
bool w[20];
std::string s;
bool f[1007][5007];
int m;
std::vector<int> v;

int main()
{
	std::ios::sync_with_stdio(false);
	std::cin >> s;
	for (int i = 0; i < (int)s.size(); i++) {
		w[i + 1] = s[i] - '0';
		if (w[i + 1]) v.push_back(i + 1);
	}
	std::cin >> m;
	if (!v.size()) { std::cout << "NO\n"; return 0; }
	int now = v[0], min = 1 << 30;
	std::vector<int> ans;
	for (int i = 1; i < (int)v.size(); i++) {
		if (v[i] - v[i - 1] <= min) {
			min = v[i] - v[i - 1];
			now = v[i - 1];
		}
	}
	ans.push_back(now);
	int a[2], last = now;
	a[0] = now; a[1] = 0;
	bool ok = true;
	for (int i = 1; i < m; i++) {
		int min = 1 << 30, p;
		for (int j = 0; j < (int)v.size(); j++) {
			if (a[i & 1] + v[j] > a[!(i & 1)] && a[i & 1] + v[j] < min && v[j] != last) {
				min = a[i & 1] + v[j];
				p = v[j];
			}
		}
		if (min >= inf) { ok = false; break; }
		a[i & 1] += p;
		last = p;
		ans.push_back(p);
	}
	if (!ok) {
		std::cout << "NO\n";
	} else {
		std::cout << "YES\n";
		for (int i = 0; i < (int)ans.size(); i++)
			std::cout << ans[i] << ' ';
	}
}

